﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="QuanLyBaoCaoCongViec.aspx.cs" Inherits="ChamCong.LanhDao.QuanLyBaoCaoGiaoViec" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        div.childMenu
        {
            padding-bottom: 10px;
        }
        
        div.childMenu ul
        {
            list-style: none;
            margin: 0px;
            padding: 0px;
            width: auto;
        }
        
        div.childMenu ul li
        {
            padding-right: 5px;
        }
        
        div.childMenu ul li a
        {
            background-color: #D4D4D4;
            color: #525252;
            display: block;
            line-height: 1.35em;
            padding: 4px 10px;
            text-decoration: none;
            white-space: nowrap;
        }
        
        div.childMenu ul li a:hover
        {
            background-color: #3399FF;
            color: #FFF;
            text-decoration: none;
        }
        
        div.childMenu ul li a:active
        {
            background-color: #3399FF;
            color: #cfdbe6;
            text-decoration: none;
        }
        
        div.childMenu ul li a:visited
        {
            font-weight: bold;
        }
        div.childMenu ul li a.current
        {
            background-color: #3399FF;
            color: #FFF;
        }
        .style1
        {
            width: 100px;
            font-weight:bold;
        }
        .style2
        {
            width: 180px;
        }
    </style>
    <script type="text/javascript">
        function ChangeRowColor(row) {
            row.style.cursor = "hand";
            var color = row.style.backgroundColor;
            if (color != '#cccccc') oldColor = color;
            if (color == '#cccccc') row.style.backgroundColor = oldColor;
            else row.style.backgroundColor = '#cccccc';
        }
    </script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <div style="width: 980px;">
        <div>
            <asp:Menu ID="Menu1" runat="server" Orientation="Horizontal" CssClass="childMenu"
                SkipLinkText="">
                <Items>
                    <asp:MenuItem Text="Yêu cầu chờ duyệt" Value="" NavigateUrl="~/LanhDao/QuanLyBaoCaoCongViec.aspx?ttd=3">
                    </asp:MenuItem>
                    <asp:MenuItem Text="Yêu cầu đã duyệt" Value="" NavigateUrl="~/LanhDao/QuanLyBaoCaoCongViec.aspx?ttd=4">
                    </asp:MenuItem>
                    <asp:MenuItem Text="Yêu cầu không duyệt" Value="" NavigateUrl="~/LanhDao/QuanLyBaoCaoCongViec.aspx?ttd=5">
                    </asp:MenuItem>
                </Items>
            </asp:Menu>
        </div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        
        <div style="float: left; width: 550px;">
            <sbc:sbcMsgBox ID="sbcMsgBox1" runat="server" UseJQuery="True" />
            <asp:UpdatePanel ID="up1" runat="server">
                <ContentTemplate>
                    <asp:GridView ID="gvGiaoViec" runat="server" AutoGenerateColumns="False"
                        OnRowDataBound="gvGiaoViec_rdb" BackColor="LightGoldenrodYellow" BorderColor="Tan"
                        BorderWidth="1px" CellPadding="4" ForeColor="Black" GridLines="None" 
                        AllowPaging="True" onpageindexchanging="gvGiaoViec_PageIndexChanging" PageSize="12">
                        <AlternatingRowStyle BackColor="PaleGoldenrod" />
                        <Columns>
                            <asp:BoundField DataField="MaGiaoViec" HeaderText="Mã" SortExpression="MaGiaoViec" />
                            <asp:BoundField DataField="MaNV" HeaderText="Mã NV" SortExpression="MaNV" />
                            <asp:BoundField DataField="HoTen" HeaderText="Họ Tên" SortExpression="HoTen" />
                            <asp:BoundField DataField="TuNgay" HeaderText="Từ Ngày" SortExpression="TuNgay" DataFormatString="{0:dd/MM/yyyy}" />
                            <asp:BoundField DataField="DenNgay" HeaderText="Đến Ngày" SortExpression="DenNgay"
                                DataFormatString="{0:dd/MM/yyyy}" />
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:LinkButton ID="likbtnChiTiet" runat="server" OnClick="likbtnChiTiet_Click">Chi tiết</asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <FooterStyle BackColor="Tan" />
                        <HeaderStyle BackColor="Tan" Font-Bold="True" />
                        <PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" HorizontalAlign="Center" CssClass="pager" />
                        <SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
                        <SortedAscendingCellStyle BackColor="#FAFAE7" />
                        <SortedAscendingHeaderStyle BackColor="#DAC09E" />
                        <SortedDescendingCellStyle BackColor="#E1DB9C" />
                        <SortedDescendingHeaderStyle BackColor="#C2A47B" />
                    </asp:GridView>
                </ContentTemplate>
            </asp:UpdatePanel>
            <asp:UpdatePanel ID="up2" runat="server">
            </asp:UpdatePanel>
            <asp:UpdatePanel ID="up3" runat="server">
            </asp:UpdatePanel>
        </div>
        <div style=" float:left; width: 400px">
            <asp:UpdatePanel ID="up4" runat="server">
                <ContentTemplate>
                    <table runat="server" id="tbChiTiet" style="float: right; width: 420px;">
                        <tr>
                            <td class="style1">
                                Mã NV:
                            </td>
                            <td class="style2">
                                <asp:Label ID="lbMaNV" runat="server"></asp:Label>
                            </td>
                            <td class="style1">
                                Họ Tên:
                            </td>
                            <td class="style2">
                                <asp:Label ID="lbHoTen" runat="server"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td class="style1">
                                Từ Ngày:
                            </td>
                            <td class="style2">
                                <asp:Label ID="lbTuNgay" runat="server"></asp:Label>
                            </td>
                            <td class="style1">
                                Đến Ngày:
                            </td>
                            <td class="style2">
                                <asp:Label ID="lbDenNgay" runat="server"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="4">
                                <asp:GridView ID="gvKQCongViec" runat="server" AutoGenerateColumns="False" BackColor="White"
                                    BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" CellPadding="4" ForeColor="Black"
                                    GridLines="Vertical" OnRowDataBound="gvKQCongViec_rdb">
                                    <AlternatingRowStyle BackColor="White" />
                                    <Columns>
                                        <asp:BoundField DataField="MaCongViec" HeaderText="Mã" SortExpression="MaCongViec" />
                                        <asp:BoundField DataField="TenCongViec" HeaderText="Công Việc" SortExpression="TenCongViec" />
                                        <asp:BoundField DataField="DonVi" HeaderText="Đơn Vị" SortExpression="DonVi" />
                                        <asp:BoundField DataField="ChiTieu" HeaderText="Chỉ Tiêu" 
                                            SortExpression="ChiTieu" >
                                        <ItemStyle HorizontalAlign="Center" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="HeSo" HeaderText="Hệ Số" SortExpression="HeSo" >
                                        <ItemStyle HorizontalAlign="Center" />
                                        </asp:BoundField>
                                        <asp:TemplateField HeaderText="Kết Quả">
                                            <ItemTemplate>
                                                <asp:Label ID="lbKetQua" runat="server" Text='<%#AutoConvert(Eval("KetQua"))%>' />
                                            </ItemTemplate>
                                            <ItemStyle Font-Bold="True" HorizontalAlign="Center" />
                                        </asp:TemplateField>
                                    </Columns>
                                    <FooterStyle BackColor="#CCCC99" />
                                    <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                                    <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                                    <RowStyle BackColor="#F7F7DE" />
                                    <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                                    <SortedAscendingCellStyle BackColor="#FBFBF2" />
                                    <SortedAscendingHeaderStyle BackColor="#848384" />
                                    <SortedDescendingCellStyle BackColor="#EAEAD3" />
                                    <SortedDescendingHeaderStyle BackColor="#575357" />
                                </asp:GridView>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="4">
                                Chú Thích:
                                <br />
                                <asp:TextBox ID="txtChuThich" runat="server" Font-Underline="False" TextMode="MultiLine"
                                    Width="350px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="4" align="center">
                                <sbc:sbcMsgBox ID="sbcMsgBox2" runat="server" UseJQuery="True" />
                                <asp:Button ID="btnDuyet" runat="server" Text="Duyệt" OnClick="btnDuyet_Click" />
                                <asp:Button ID="btnKhongDuyet" runat="server" Text="Không Duyệt" OnClick="btnKhongDuyet_Click" />
                            </td>
                        </tr>
                    </table>
                    <sbc:sbcMsgBox ID="sbcMsgBox3" runat="server" UseJQuery="True" />
                </ContentTemplate>
            </asp:UpdatePanel>
        </div>
    </div>
</asp:Content>
